package model.dap.mapper;

import java.util.ArrayList;

import model.dap.domain.Deal;

import org.apache.ibatis.annotations.Param;


public interface DealMapper {
	
	public ArrayList<Deal>searchForDeal(@Param("limit") int limit, @Param("offset") int offset) throws Exception;
	public ArrayList<Deal>searchForDealByCategoryAndCity(@Param("limit") int limit, @Param("offset") int offset, @Param("cityID")int cityID, @Param("categoryID") int categoryID) throws Exception;
	public ArrayList<Deal>searchForDealByCity(@Param("limit") int limit, @Param("offset") int offset, @Param("cityID")int cityID) throws Exception;
	public int countForSearch() throws Exception;
	public int updateNumberOrderDeal(Deal deal);
	public Deal getDealbyID(int dealID);	
	public Deal selectDeal(int dealID);
	public int updateEditNumberOrderDeal(Deal deal);
	public String selectCategoryName(int categoryID);
	public int countForSearchByCity(int cityID) throws Exception;
	public int countForSearchByCityAndCategory(@Param("cityID") int cityID, @Param("categoryID") int categoryID) throws Exception;
}